﻿using UnityEngine;
using System.Collections;
/// <summary>
/// 游戏玩家
/// </summary>
public class GamePlayer 
{
    private int mID;
    public int ID {get {return mID;}}
    public CameraController mCamera;
    int mCamp; 
    public int Camp { set { mCamp = value; } get { return mCamp; } }
    Unit mainUnit;
    public Unit MainUnit { set { mainUnit = value; mainUnit.GamePlayerId = mID;  } get { return mainUnit; } }

    private string _UserName;
    public string UserName { get { return _UserName; } }
    public GamePlayer(int id,string userName) 
    {
        this.mID = id;
        this._UserName = userName;
    }

    public void OnLoad() 
    {
        this.mCamera = Camera.main.gameObject.GetComponent<CameraController>();
        this.mCamera.OnLoad();
    }
}
